<%@page isELIgnored="false" import="java.net.*" %>
<%@taglib prefix="tiles" uri="struts-tiles" %>
<%@taglib prefix="html" uri="struts-html" %>
<%@taglib prefix="c" uri="jstl" %>
<%@taglib prefix="fn" uri="jstl-fn" %>					
<%@page import="com.mastercard.assets.web.util.to.UserLogin"%><div id="bodyContent">
    <script type="text/javascript">
    function valida( ) {
        var aceptar = confirm( "you want to add the user account?" )
        if ( aceptar == false )
            return false ;
        
        return true ;
    }
</script>
						<h1>Edit User</h1>
						
						<center>
						<html:form action="/AgregarCuentaAUsuarioAgregar.do" method="post" onsubmit="return valida(this);">
						<html:hidden property="regId" />
						<html:hidden property="campo1" />
						<html:hidden property="catalogoId" />
						<html:hidden property="operation" value="7"/>
						<br/>
						
						<div class='errors'>
						<html:errors/><br/>
						${UserLogin.messageError}
						</div>
						
						<table class="TablaCatalogosNuevoTipoCuenta">
							<thead>
								<tr>
									<th>
										Add a User Account
									</td>
								</tr>
							</thead>
							<tr>
								<td>
									<br/>
									<table class='TablaCatalogosFields'>
										<tr>
											<td class='TDLabel'>
												User: &nbsp;&nbsp;
											</td>
											<td class='TDField'>
												${AgregarCuentaAUsuarioAgregarForm.campo1}
											</td>
										</tr>
										<tr>
											<td class='TDLabel'>
												Accounts: &nbsp;&nbsp;
											</td>
											<td class='TDField'>
												<html:select property="campoIntArr1" multiple="true" size="${fn:length(OtherCounts)}">
<c:forEach items="${OtherCounts}" var="count">
													<option value="${count.cveCuenta}">Cuenta ${count.nombre}</option>
</c:forEach>
												</html:select>
											</td>
										</tr>
										<tr>
											<td colspan='2' class='TDButton'>
												<html:submit value='Update' styleClass="ButtonSubmit" />
											</td>
										</tr>
									</table>
								</td>
							</tr>
						</table>
						</html:form>
						</center>
					</div>
					<div id="footContent"></div>
<%
	UserLogin user = ( UserLogin ) request.getSession( ).getAttribute( "UserLogin" ) ;

	// en caso de no null
	if( user != null )
		user.clearMessageError( ) ;
%>